Hash algorithms speed up searching and sorting by mapping an object key to a bucket where the associated object value or object value locator is stored. They also find use in load balancing applications where a key associated with a request (such as a username, or client ID, or network address) is used to determine what resources should be used to satisfy the request. In recent years, there has been extensive use of consistent hash functions in load balancing and peer to peer applications.
Typically, in both load balancing and peer to peer applications “churn” (changes in the number of buckets) occurs. Conventional hash algorithms cause nearly all of the keys to be remapped between buckets when the number of buckets changes. By contrast, consistent hashing algorithms provide hash table semantics where addition or removal of buckets do not cause significant numbers of objects to be remapped between buckets that have not been added or removed. The method of consistent hashing allows the hash table to map to physical objects, like disks or computers or network nodes, which may either be removed due to failure or added in response to load. When consistent hashing is used, the hashed objects (which, among other things, may be data objects, network sessions, or users) do not suffer excessive churn when the set of physical resources is changed.